import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import path from 'path'

export default defineConfig({
    plugins: [uni()],
	resolve: {
	    alias: {
		  '@': path.resolve(__dirname),
	    }
	},
    server: {
        proxy: {
            '/api': {
                target: 'http://120.79.70.217:8080',
                changeOrigin: true,
                // rewrite: (path) => path.replace(/^\/api/, '') // 去掉 /api 前缀,根据后端设置来调整是否需要在接口前加上api
            }
        }
    },
})
